﻿using SqlSugar;

namespace Bigway.Common.Models.DbModels;

public class BaseCodeNameEntity
{
    [SugarColumn(IsPrimaryKey = true, Length = 10)]
    public string SystemId { get; set; }

    [SugarColumn(IsPrimaryKey = true, Length = 20)]
    public string Code { get; set; }

    [SugarColumn(IsNullable = false, Length = 20)]
    public string Name { get; set; }

    [SugarColumn(IsNullable = false)]
    public int Order { get; set; }

    public string Id => $"{SystemId}:{Code}";
}